230
3425 N FIRST ST, FRESNO
499
Alturas-Fourth St.
2
Anaheim
351
Aqua Tibia Wilderness
104
Atascadero (original site)
116
Azusa
339
Bakersfield-Airport (Planz)
117
Bakersfield-California
1295
Bakersfield-Golden / M St
91
Big Bear
56
Bliss SP
113
Brawley-401 Main St.
85
Burbank
122
Calexico-Ethel Street
165
Chico-Manzanita Ave.
120
Chula Vista
116
Clovis-Villa
86
Colusa-Sunrise Blvd
95
Concord
276
Corcoran-Patterson
83
Death Valley NP - Park Village
115
Echo Summit
2
El Cajon
416
El Centro-9th Street
92
El Rio-Rio Mesa School #2
114
Escondido
355
Eureka I Street
59
Fontana
118
Fremont - Chapel Way
105
Fresno-Pacific
91
Grass Valley-Litton Building
50
Hoover Wilderness
111
Indio
117
Joshua Tree NP - Black Rock
96
Kaiser Wilderness
84
Kearny Mesa
111
Keeler
162
Lakeport-Lakeport Blvd.
61
Lancaster-Division Street
107
Lassen Volcanic NP - Manzanita Lake Fire Station
104
Lava Beds National Monument
104
Lebec
109
Lebec-Peace Valley Road
93
Livermore
96
Long Beach (North)
356
Los Angeles-North Main Street
365
Lynwood
122
Merced-M St
89
Mission Viejo
119
Modesto-14th Street
183
Mojave
100
Ontario Fire Station
111
Palm Springs
119
Pasadena
121
Pinnacles NP - Southwest of East Entrance Station
119
Piru - Pacific
117
Point Reyes NS Ranger Station
97
Portola-161 Nevada Street
100
Quincy-N Church Street
77
Redding - Buckeye
54
Redding - Health Department
54
Redding - Toyon
59
Redwood City
100
Redwood NP
110
Reseda
120
Ridgecrest-California Ave
104
Riverside (Magnolia)
115
Roseville-N Sunrise Ave
60
Rubidoux
562
Sacramento Health Department-Stockton Blvd.
154
Sacramento-1309 T Street
380
Sacramento-Del Paso Manor
285
Salinas 3
120
San Andreas-Gold Strike Road
60
San Bernardino
117
San Diego-12th Ave
352
San Francisco
196
San Jose
217
San Jose - 4th St.
141
San Jose - Jackson
101
San Luis Obispo-Marsh St.
52
San Rafael Wilderness
92
Santa Cruz
61
Santa Maria
60
Santa Rosa - 5th St
93
Sequoia NP-Ash Mountain
104
Simi Valley-Cochran Street
169
South Lake Tahoe-Sandy Way
93
Stockton-Hazelton
124
Thousand Oaks
156
TRAFFIC, RURAL PAVED ROAD
353
Trinity
90
Truckee-Fire Station
176
Ukiah-Library
122
Vallejo
97
Victorville-Park Avenue
225
Visalia-Church
404
Woodland-Gibson Road
112
Yosemite NP - Turtleback Dome
116
Yosemite NP-Yosemite Village Vistor Center
174
Yuba City
114
summary(part2002$DAILY_OBS_COUNT)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1 1 1 1 1 1
The dataset has 15976 observations and 20 variables. There are no NA’s and there was at least one value taken once per day throughout all of 2002 at one of the sites. There were no missed days. The data was collected from counties all across California. The median daily AQI value was 50.00 while the mean was 53.68. The daily median PM2.5 is 12.00 and the mean is 16.12. There are no NAs in this dataset.
Looking through 2022 Data
dim(part2022)
[1] 56140 20
head(part2022)
Date Source Site ID POC Daily Mean PM2.5 Concentration UNITS
1: 01/01/2022 AQS 60010007 3 12.7 ug/m3 LC
2: 01/02/2022 AQS 60010007 3 13.9 ug/m3 LC
3: 01/03/2022 AQS 60010007 3 7.1 ug/m3 LC
4: 01/04/2022 AQS 60010007 3 3.7 ug/m3 LC
5: 01/05/2022 AQS 60010007 3 4.2 ug/m3 LC
6: 01/06/2022 AQS 60010007 3 3.8 ug/m3 LC
DAILY_AQI_VALUE Site Name DAILY_OBS_COUNT PERCENT_COMPLETE
1: 52 Livermore 1 100
2: 55 Livermore 1 100
3: 30 Livermore 1 100
4: 15 Livermore 1 100
5: 18 Livermore 1 100
6: 16 Livermore 1 100
AQS_PARAMETER_CODE AQS_PARAMETER_DESC CBSA_CODE
1: 88101 PM2.5 - Local Conditions 41860
2: 88101 PM2.5 - Local Conditions 41860
3: 88101 PM2.5 - Local Conditions 41860
4: 88101 PM2.5 - Local Conditions 41860
5: 88101 PM2.5 - Local Conditions 41860
6: 88101 PM2.5 - Local Conditions 41860
CBSA_NAME STATE_CODE STATE COUNTY_CODE COUNTY
1: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
2: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
3: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
4: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
5: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
6: San Francisco-Oakland-Hayward, CA 6 California 1 Alameda
SITE_LATITUDE SITE_LONGITUDE
1: 37.68753 -121.7842
2: 37.68753 -121.7842
3: 37.68753 -121.7842
4: 37.68753 -121.7842
5: 37.68753 -121.7842
6: 37.68753 -121.7842
tail(part2022)
Date Source Site ID POC Daily Mean PM2.5 Concentration UNITS
1: 12/01/2022 AQS 61131003 1 3.4 ug/m3 LC
2: 12/07/2022 AQS 61131003 1 3.8 ug/m3 LC
3: 12/13/2022 AQS 61131003 1 6.0 ug/m3 LC
4: 12/19/2022 AQS 61131003 1 34.8 ug/m3 LC
5: 12/25/2022 AQS 61131003 1 23.2 ug/m3 LC
6: 12/31/2022 AQS 61131003 1 1.0 ug/m3 LC
DAILY_AQI_VALUE Site Name DAILY_OBS_COUNT PERCENT_COMPLETE
1: 14 Woodland-Gibson Road 1 100
2: 16 Woodland-Gibson Road 1 100
3: 25 Woodland-Gibson Road 1 100
4: 99 Woodland-Gibson Road 1 100
5: 74 Woodland-Gibson Road 1 100
6: 4 Woodland-Gibson Road 1 100
AQS_PARAMETER_CODE AQS_PARAMETER_DESC CBSA_CODE
1: 88101 PM2.5 - Local Conditions 40900
2: 88101 PM2.5 - Local Conditions 40900
3: 88101 PM2.5 - Local Conditions 40900
4: 88101 PM2.5 - Local Conditions 40900
5: 88101 PM2.5 - Local Conditions 40900
6: 88101 PM2.5 - Local Conditions 40900
CBSA_NAME STATE_CODE STATE COUNTY_CODE
1: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
2: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
3: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
4: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
5: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
6: Sacramento--Roseville--Arden-Arcade, CA 6 California 113
COUNTY SITE_LATITUDE SITE_LONGITUDE
1: Yolo 38.66121 -121.7327
2: Yolo 38.66121 -121.7327
3: Yolo 38.66121 -121.7327
4: Yolo 38.66121 -121.7327
5: Yolo 38.66121 -121.7327
6: Yolo 38.66121 -121.7327
320
29 Palms
414
Alpine
356
Anaheim
772
Aqua Tibia Wilderness
64
Arroyo Grande CDF
359
Atascadero
349
Auburn-Atwood
354
Azusa
76
Bakersfield-Airport (Planz)
114
Bakersfield-California
712
Bakersfield-Golden / M St
329
Banning Airport
365
Big Bear
394
Bishop Tribe EMO
352
Brawley-220 Main Street
349
Calexico-Ethel Street
448
Camp Pendleton
357
Campo Indian Reservation
362
Carmel Valley
350
Chester-222 First Ave
289
Chico-East Avenue
410
Chula Vista
102
Clovis-Villa
359
Colfax-City Hall
358
Colusa-Sunrise Blvd
359
Compton
723
Concord
463
Corcoran-Patterson
360
Cortina Indian Rancheria
42
Crescent City-Crescent Elk School
338
Crestline
178
Davis-UCD Campus
322
Donovan
360
El Cajon - Lexington Elementary School
489
El Centro-9th Street
358
El Rio-Rio Mesa School #2
361
Folsom-Natoma St.
696
Fontana
180
Fresno - Garland
533
Fresno-Foundry
357
Fresno-Pacific
352
Gilroy
340
Glendora
365
Goleta
361
Grass Valley-Litton Building
358
Hanford-Irwin
361
Hollister
359
Hoover Wilderness
117
Huron
357
Indio
123
Jacobs
116
Joshua Tree NP - Black Rock
119
Kaiser Wilderness
112
Keeler
473
King City 2
351
Lake Elsinore
365
Lake Tahoe Community College
111
Lakeport-S. Main Street
61
Lancaster-Division Street
348
Laney College
360
Lassen Volcanic NP - Manzanita Lake Fire Station
107
Lava Beds National Monument
112
Lebec
398
Lebec-Peace Valley/Frazier Park Roads
106
Lee Vining
358
Lincoln-2885 Moore Road
357
Livermore
343
Lompoc H Street
354
Lone Pine Paiute-Shoshone Reservation
302
Long Beach (North)
55
Long Beach (South)
239
Long Beach-Route 710 Near Road
574
Los Angeles-North Main Street
906
Madera-City
360
Mammoth
111
Manteca
311
Merced-Coffee
359
Merced-M St
360
Mesa2
360
Mira Loma (Van Buren)
778
Mission Viejo
108
Modesto-14th Street
404
Mojave - CA 58 Business
355
Morongo Air Monitoring Station
385
North Hollywood (NOHO)
365
Oakland
365
Oakland West
364
Ojai - East Ojai Ave
360
Ontario-Route 60 Near Road
530
Pala Airpad
365
Palm Springs
120
Paradise - Theater
354
Pasadena
120
Pechanga
402
Pico Rivera #2
118
Pinnacles NP - Southwest of East Entrance Station
119
Piru - Pacific
361
Pleasanton - Owens Ct
361
Point Reyes NS Ranger Station
116
Porterville
356
Portola
485
Quincy-N Church Street
332
Red Bluff-Walnut St. District Office
347
Redding - Health Department
373
Redwood City
356
Redwood NP
120
Reseda
482
Ridgecrest-Ward
360
Roseville-N Sunrise Ave
349
Rubidoux
813
Sacramento-1309 T Street
446
Sacramento-Bercut Drive
359
Sacramento-Del Paso Manor
703
Salinas 3
418
San Andreas-Gold Strike Road
355
San Bernardino
118
San Diego - Kearny Villa Rd.
172
San Diego - Sherman Elementary School
437
San Diego -Rancho Carmel Drive
119
San Francisco
361
San Jose - Jackson
485
San Jose - Knox Avenue
358
San Lorenzo Valley Middle School
358
San Pablo
354
San Rafael
360
San Rafael Wilderness
95
Santa Barbara
351
Santa Clarita
365
Santa Cruz
351
Sebastopol
348
Sequoia & Kings Canyon NPs - Ash Mountain
352
Sequoia NP-Ash Mountain
122
Signal Hill (LBSH)
293
Simi Valley-Cochran Street
714
SLO Roberto
359
Sloughhouse
352
Stn.1 Big Pine Paiute site
325
Stockton - University Park
350
Table Mountain Air Monitoring Site
339
Tahoe City-Fairway Drive
356
Temecula
365
Thousand Oaks
356
Torres Martinez Reservation
235
Tracy-Airport
355
TRAFFIC, RURAL PAVED ROAD
357
Tranquillity
352
Trinity
50
Truckee-Fire Station
354
Turlock
341
Ukiah-Library
350
Upland
365
Vallejo
720
Victorville-Park Avenue
714
Visalia-W. Ashland Avenue
393
Weaverville-Courthouse
352
White Mountain Research Center - Owens Valley Lab
410
Willits-Blosser Lane
351
Willows-Colusa Street
351
Woodland-Gibson Road
59
Yosemite NP - Turtleback Dome
224
Yosemite NP-Yosemite Village Vistor Center
350
Yreka
312
Yuba City
712
summary(part2022$DAILY_OBS_COUNT)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1 1 1 1 1 1
The 2022 dataset has 56140 observations and 20 variables. There are no NA’s and there was at least one value taken once per day throughout all of 2022 at one of the sites. There were no missed days. The data was collected from counties all across California. The median daily AQI value was 29.00 while the mean was 32.84. The daily median PM2.5 is 6.90 and the mean is 8.52. There are no NAs in this dataset.
Combining the Datatables
part2002$year <-"2002"part2022$year <-"2022"#creating new names for variablespart2002$PM2.5<- part2002$`Daily Mean PM2.5 Concentration`part2022$PM2.5<- part2022$`Daily Mean PM2.5 Concentration`part2002$lat <- part2002$SITE_LATITUDEpart2022$lat <- part2022$SITE_LATITUDEpart2002$lon <- part2002$SITE_LONGITUDEpart2022$lon <- part2022$SITE_LONGITUDE#merging datacombo <-rbind(part2002, part2022)
There are a lot more locations in 2022 then there are in 2002. There are very few sites near the border between California and Arizona. In 2002 the distribution is more focused on the border of California and a couple spots in central California. In 2022 there are many more sites throughout the state with higher concentrations around Sacramento, the bay area, LA, and San Diego.
Checking PM2.5
table(is.na(combo$PM2.5))
FALSE
72116
boxplot(combo$PM2.5)
barplot(combo$PM2.5)
hist(combo$PM2.5)
There is no missing data in PM2.5.
Main Question
#statecombo$datenum<-as.Date.character(combo$Date)combo %>%ggplot() +geom_boxplot(mapping =aes(x =1, y = combo$PM2.5, color = combo$year)) +facet_wrap(~ year, nrow=1)
summary(part2002$PM2.5)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 7.00 12.00 16.12 20.50 104.30
summary(part2022$PM2.5)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-2.20 4.20 6.90 8.52 10.80 302.50
combo %>%ggplot() +geom_histogram(mapping =aes(x = PM2.5, color = combo$year, fill = combo$year), alpha=0.5, position="dodge")
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
combo %>%ggplot() +geom_line(mapping =aes(x = datenum, y = combo$PM2.5, group = year, color = year))
Overall for the state data the the median 75th quarrile for 2022 is all much lower than the particulate matter 2.5 in 2002. However there are a lot more outliers in 2022 than there are in 2002 and the outliers are much higher than they are in 2002. There is a period of time in september to october of 2022 that the particulate matter across California is really high, this is probably due to a wildfire that occurred in California during that time. Due to the outliers the data from 2022 seems to be worsening particulate matter due to just how much higher the bad days are than in 2002 but overall has better air quality.
County
When looking at the data from just Alameda county it is clear that overall the air quality is better in 2022 than it was in 2002. There are far higher outliers in 2002 than there are in 2022. Also the medians and means of particulate matter are lower in 2022 than in 2002.
LA Site
When looking at the data from just the LA Site as Los Angeles-North Main Street it is clear that the air quality is better in 2022 than it is in 2002. When looking at the line plot almost every day in 2002 had a higher particulate matter amount than in 2022.